package com.lagou.service.impl;

import com.lagou.service.DubboService;
import org.apache.dubbo.config.annotation.Service;

import java.util.Random;

@Service
public class DubboServiceImpl implements DubboService {

    Random random = new Random();

    @Override
    public String methodA(String name) {
          try {
            Thread.sleep(random.nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        return "methodA";
    }

    @Override
    public String methodB(String name) {
        try {
            Thread.sleep(random.nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        return "methodB";
    }

    @Override
    public String methodC(String name) {
        try {
            Thread.sleep(random.nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        return "methodC";
    }
}
